package com.wgo.precise.client.ui.view.util.contentproviders;

import com.wgo.precise.client.ui.model.RootProjectSystemWrapper;
import com.wgo.precise.client.ui.model.facade.ModelSystem;

public class RequirementTreeViewContentProvider extends ModelTreeViewContentProvider {

	@Override
	public Object[] getChildren(Object parent) {
		if (parent instanceof ModelSystem[]) {
			for (ModelSystem system : (ModelSystem[])parent) {
				if (system instanceof RootProjectSystemWrapper) {
					return ((RootProjectSystemWrapper)parent).getChildren().toArray();
				}
			}
			return new Object[0];
		}
		return super.getChildren(parent);
	}


}